﻿using System.Reflection;
using System.Windows;

namespace DeploySources.View
{
	/// <summary>
	/// Interaction logic for About.xaml
	/// </summary>
	public partial class AboutBox : Window
	{
		public AboutBox()
		{
			InitializeComponent();
			DataContext = this;

			lizenseLink.RequestNavigate += (sender, e) =>
			{
				System.Diagnostics.Process.Start(e.Uri.ToString());
			};
		}

		public string AssemblyVersion => GetAssemblyVersion();

		private string GetAssemblyVersion()
		{
			var version = Assembly.GetExecutingAssembly().GetName().Version;
			return version.Major + "." + version.Minor;
		}
	}
}
